import java.awt.Dimension;
import javax.swing.JPanel;

public class TwitterButtonPanelView extends JPanel {
	private BackgroundPanelView backgroundPanel;
	private TwitterButtonBackgroundController changeBackground;  
	private TwitterButtonGetTweetsController getTweets;
	private TwitterButtonAddUserController addUser;
	public TwitterButtonPanelView(BackgroundPanelView backgroundPanel) {
		this.backgroundPanel = backgroundPanel;
		initialize();
	}
	
	public BackgroundPanelView getBackgroundPanel() {
		return backgroundPanel;
	}

	private void initialize() {
		this.setVisible(true);
		this.setOpaque(false);
		this.changeBackground = new TwitterButtonBackgroundController("image/button/changeBackground.png", "image/button/changeBackgroundRollover.png", this.getBackgroundPanel());
		this.getTweets = new TwitterButtonGetTweetsController("image/button/getTweets.png", "image/button/getTweetsRollover.png");
		this.addUser = new TwitterButtonAddUserController("image/button/addUser.png", "image/button/addUserRollover.png");
		this.add(changeBackground);
		this.add(getTweets);
		this.add(addUser);
		changeBackground.setPreferredSize(new Dimension(changeBackground.rolloverImage.getIconWidth(), changeBackground.rolloverImage.getIconHeight()));
		getTweets.setPreferredSize(new Dimension(getTweets.rolloverImage.getIconWidth(), getTweets.rolloverImage.getIconHeight()));
		addUser.setPreferredSize(new Dimension(addUser.rolloverImage.getIconWidth(), addUser.rolloverImage.getIconHeight()));
	}
}
